import request from '@/utils/request'

// 导入store实例，组件才能this.$store
import store from '@/store/index'

// 获取用户信息
const getUserInfoApi = () => {
  return request({
    method: "get",
    url: "/my/userinfo",
    headers: {
      Authorization: store.state.user.token
    }
  })
}

// 获取左侧菜单栏
const getMeunsApi = () => {
  return request({
    method: "get",
    url: "/my/menus",
    headers: {
      Authorization: store.state.user.token
    }
  })
}
export {
  getUserInfoApi,
  getMeunsApi
}
